Pattern Synonyms ( Extended version )

نویسندگان

  • Matthew Pickering
  • Gergő Érdi
  • Simon Peyton Jones
  • Richard A. Eisenberg
چکیده

Pattern matching has proven to be a convenient, expressive way of inspecting data. Yet this language feature, in its traditional form, is limited: patterns must be data constructors of concrete data types. No computation or abstraction is allowed. The data type in question must be concrete, with no ability to enforce any invariants. Any change in this data type requires all clients to update their code. This paper introduces pattern synonyms, which allow programmers to abstract over patterns, painting over all the shortcomings listed above. Pattern synonyms are assigned types, enabling a compiler to check the validity of a synonym independent of its definition. These types are intricate; detailing how to assign a type to a pattern synonym is a key contribution of this work. We have implemented pattern synonyms in the Glasgow Haskell Compiler, where they have enjoyed immediate popularity, but we believe this feature could easily be exported to other languages that support pattern matching.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

No Negotiation, Limited Negotiation, and Extended Negotiation in Proactive Focus on Form in Vocabulary Acquisition

Negotiation, as an interactional strategy and proactive focus on form (FoF) have received increased attention in second language research. The combination of negotiation and proactive FoF, however, has not been examined in relation to L2 vocabulary learning. To address this gap, the present study investigated how the amount of negotiation and proactive FoF impacted learners’ vocabulary knowledg...

متن کامل

Using a Divergence Model for MediaEval’s Tagging Task (Professional Version)

Novay participated in MedieaEval Tagging Task (professional version). For this task videos have to be ranked according to their relevance for a number of different concepts. Our approach was based solely on the abstracts of the videos. A divergence model has been used for retrieval in which both the query and the document model are extended by a Markov chain. The results could be improved by us...

متن کامل

Distinguishing Antonyms and Synonyms in a Pattern-based Neural Network

Distinguishing between antonyms and synonyms is a key task to achieve high performance in NLP systems. While they are notoriously difficult to distinguish by distributional co-occurrence models, pattern-based methods have proven effective to differentiate between the relations. In this paper, we present a novel neural network model AntSynNET that exploits lexico-syntactic patterns from syntacti...

متن کامل

Cortbase version 2 – extensive updates of a nomenclatural database for corticioid fungi ( Hymenomycetes )

Cortbase is a nomenclatural database for corticioid (resupinate) fungi (Corticiaceae s.l. and related hymenomycetes) with basionyms, synonyms, taxonomically correct names, data on name usage, literature references, and evaluation of nomenclatural status. It is available as an on-line service (http://andromeda.botany.gu.se/cortbase.html) and as an MS-DOS executable for local installation. The da...

متن کامل

On the use of antonyms and synonyms from a domain perspective

This corpus study addresses the question of the nature and the structure of antonymy and synonymy in language use, following automatic methods to identify their behavioral patterns in texts. We examine the conceptual closeness/distance of synonyms and antonyms through the lens of their DOMAIN instantiations.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016